import { useState } from "react";
import './index.css'
function Counter(){
    const [count,setCount] = useState(0);
    const incr = ()=>{
        setCount(count +1 );
    }
    const descr = ()=>{
        setCount(count -1 );
    }

    const reset = ()=>{
        setCount(0);
    }
    return (
        <div className="counter-container">
            <p className="count-display">{count}</p>
            <button className="count-button" onClick={incr}>incr</button>
            <button className="count-button" onClick={descr}>decr</button>
            <button className="count-button" onClick={reset}>reset</button>
        </div>
    )
}

export default Counter;